<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="../general/header.jsp" %>

<div id="header">USER DETAILS</div>
<%@ include file="../general/menu.jsp" %>
<div id="content">
	<h2><c:out value="${userD.userName}"/></h2>
	<br />
	<span>Name: <c:out value="${userD.name}"/></span>
	<br />
	<span>Last Name: <c:out value="${userD.lastName}"/></span>
	<br />
	<span>Birthday: <fmt:formatDate type="date" value="${userD.birthday}" /></span>
	<br />
	<span>Genre: <c:choose>
						<c:when test="${userD.male == 'true'}">
							Male	
						</c:when>
						<c:otherwise>
							Female
						</c:otherwise>
					</c:choose>
	</span>
	<br />
	<c:if test="${not empty userL}">
	<span>Positives: ${positive} - Neutrals: ${neutral} - Negatives: ${negative} </span>
	<br />
	</c:if>
	<h3><c:out value="Comments"/></h3>
	<br />
	<div>
		<table class="listas">
			<c:forEach var="comment" items="${comments}">
				<tr><td> <c:out value="${comment}" /> </td></tr> 
			</c:forEach>
		</table>
	</div>
	<h3><c:out value="${userD.userName}'s items"/></h3>
	<%@ include file="../item/list.jsp" %>
	<c:if test="${userL.admin == 'true'}">
	<div>
		<h4>Pending Debts</h4>
		<c:if test="${hasDebts == 'true'}">
			<%@ include file="../purchase/purchaseTable.jsp" %>
		</c:if>
	</div>
	</c:if>
</div>
<div style="clear:both;"></div>
<div id="bottom">
	<span class="inline spaced">
		<a class="color" href="../general/index">Go back to index</a>
	</span>
</div>
<%@ include file="../general/footer.jsp" %>
